import sys

from os.path import join, dirname, normpath

bl_info = {
    "name": "Render Queue",
    "description": "简单的渲染队列插件",
    "version": (1, 0),
    "blender": (4, 0, 0),
    "location": "顶部工具栏和偏好设置底部",
    "author": "AIGODLIKE Community(BlenderCN辣椒,小萌新)",
    "category": "Render",
}

name = bl_info['name']
site_packages = normpath(join(dirname(__file__), 'rsc\\lib'))


def add_path_to_system():
    if site_packages in sys.path:  # 添加库路径模块
        return
    sys.path.append(site_packages)


def register():
    add_path_to_system()
    from .utils import reg
    reg.register()


def unregister():
    if site_packages in sys.path:
        sys.path.remove(site_packages)

    from .utils import reg
    reg.unregister()
